<?php
class BookContentModel extends Model{

	public function getContent($bookContent){
		if(!$bookContent["isPic"]){
			if(IS_SAE){
				$k = Think::instance('SaeKV');
				return $k->get($bookContent["savePath"]);
			}else{
				return file_get_contents(__ROOT__.$bookContent["savePath"]);
			}
		}else{
			$s = Think::instance('SaeStorage');
			$paths = explode("|", $bookContent["savePath"]);
			$html = '';
			foreach($paths as $path){
				$url = $s->getUrl(C("STORAGE_IMAGE_DOMAIN"), $bookContent["savePath"]);
				$html .= "<img src='{$url}'>";
			}
			return $html;
		}
	}
	
}
